-- GENERATED SPELL FOR [Shadowmoon Channeler] --


function spell0_17653(pUnit, Event) --@Mark of Shadow,n/a--
pUnit:FullCastSpellOnTarget(30937,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17653', 1000, 1)
end

function spell1_17653(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17653', 3000, 1)
end

function spell2_17653(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15472,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17653', 3000, 1)
end

function Sorts_17653(pUnit, Event)
local choix_sorts_17653 = math.random(0, 2)
if choix_sorts_17653 == 0 then
pUnit:RegisterEvent('spell0_17653', 1, 1)
end
if choix_sorts_17653 == 1 then
pUnit:RegisterEvent('spell1_17653', 1, 1)
end
if choix_sorts_17653 == 2 then
pUnit:RegisterEvent('spell2_17653', 1, 1)
end
end

function mob17653_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17653', math.random(1500, 3000), 1)
end

function mob17653_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17653_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17653_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17653, 1, 'mob17653_Action')
RegisterUnitEvent(17653, 2, 'mob17653_Leave')
RegisterUnitEvent(17653, 3, 'mob17653_Kill')
RegisterUnitEvent(17653, 4, 'mob17653_Die')
